<ion-view>
	<div class="bar bar-header bar-positive">
	      <a class="button  button-clear ion-chevron-left" ui-sref="yuyue.home" style="font-size:27px;"></a>
	      <h1 class="title">场馆预约</h1>
	</div>
	<ion-content class="has-header">
		<div class="list">
			<label class="item item-input">
				<span class="input-label">项目</span>
				<span class="input-label">{{yuyueInfo['name']}}</span>
			</label>
			<label class="item item-input">
				<span class="input-label">时间</span>
				<span class="input-label">{{yuyueInfo['day']}} {{yuyueInfo['time']}}</span>
			</label>
			<label class="item item-input item-select">
				<span class="input-label">类型</span>
				<span class="input-label">{{groundInfo.min[groundInfo.MySelect]}}-{{groundInfo.max[groundInfo.MySelect]}}人</span>
				<select ng-options="item.id as item.name for item in groundInfo.allGround" ng-model="groundInfo.MySelect">
				</select>
			</label>
			
			<label class="item item-input">
				<span class="input-label">手机号</span>
				<input type="text"  ng-model="yuyueInfo['phone']" required>
			</label>
			<label class="item item-input item-stacked-label">
				<span class="input-label">邀请好友</span>
				<button class="button button-icon ion-plus addFriendButton" ng-click="modal.show()"></button>
				<div class="padding">
					<div ng-bind-html="groundInfo.allUserString"></div>
				</div>
				
			</label>
			<div class="item item-input">
				<span class="input-label">验证码</span>
				<input type="text"  required>
				<label class="validate_input"><img src="http://yuyue.seu.edu.cn/eduplus/control/validateimage"></label>
			</div>
			
			<div class="padding">
				<button class="button button-full button-positive" ng-click="judegInfo()">预约</button>
			</div>
		</div>
	</ion-content>
</ion-view>
<script id="addFriend.html" type="text/ng-template">
	<ion-modal-view>
		<div class="bar bar-header bar-positive">
	      <h1 class="title">添加好友</h1>
	      <button class="button button-clear button-primary" ng-click="completeAddUser()">完成</button>
	</div>
		<ion-content class="has-header">
			<div class="list">
				<div class="item item-input-inset">
					<label class="item-input-wrapper">
						<i class="icon ion-ios-search placeholder-icon"></i>
						<input type="text" ng-model="groundInfo.searchCardnum" placeholder="Search">
					</label>
					<button class="button button-small button-positive" ng-click="searchUser()" style="width:50px;">
					    查找
					</button>
				</div>
			<ion-item>
				查询结果
			</ion-item>
			<ion-item ng-repeat="item in groundInfo['searchUser']">
				<div class="row">
					<p class="col col-75">{{item.name}}</p>
					<button class="col button button-small button-positive" ng-disabled="!item.state" ng-click="newUser(item)">添加</button>
				</div>
			</ion-item>
			<ion-item>
				已添加好友
			</ion-item>
			<ion-item ng-repeat="item in groundInfo['allUser']">
				<div class="row">
					<p class="col col-75">{{item.name}}</p>
					<button class="col button button-small button-positive" ng-click="removeUser(item)">移除</button>
				</div>
			</ion-item>
			</div>
		</ion-content>
	</ion-modal-view>
</script>